|
www.mxdraw.com
|
与用户交,返回角度.
[helpstring("method GetAngle")]
HRESULT GetAngle([in] IMxDrawPoint* point, [in] BSTR prompt, [out,retval] DOUBLE* pAng);|
参数 |
说明 |
|
[in] IMxDrawPoint* point |
输入角度时的参考点,可以传为空,让用输入参考点。 |
|
[in] BSTR prompt |
输入角度时的提示信息 |
|
[out,retval] DOUBLE* pAng |
返回输入的角度.如果失败,返回值为-99999.9 |
如果失败,返回值为-99999.9
例如: VB调用代码
Private Sub Command1_Click()
MxDrawX1.DoCommand 1
End Sub
Private Sub MxDrawX1_ImplementCommandEvent(ByVal iCommandId As Integer)
If iCommandId = 1 Then
Dim utility As MxDrawXLib.MxDrawUtility
Set utility = New MxDrawXLib.MxDrawUtility
Dim angle As Double
angle = utility.GetAngle(, Chr(13) + Chr(10) + "输入角度:")
If angle <> -99999.9 Then
MsgBox angle * 180# / 3.14159265
End If
End If
End Sub